<div>
    <div class="table-top">
        <el-button type="primary" @click="addHandle">新增</el-button>
        <el-button type="warning" @click="clearHandle">清除失效AK</el-button>
    </div>
    <el-table border>
        <el-table-column label="ak值" header-align="center" align="center"></el-table-column>
        <el-table-column label="所属APP" header-align="center" align="center"></el-table-column>
        <el-table-column label="环境" header-align="center" align="center"></el-table-column>
        <el-table-column label="状态" header-align="center" align="center"></el-table-column>
        <el-table-column label="登录用户名（手机号码）" header-align="center" align="center"></el-table-column>
        <el-table-column label="昵称" header-align="center" align="center"></el-table-column>
        <el-table-column label="用户id" header-align="center" align="center"></el-table-column>
        <el-table-column label="操作" header-align="center" align="center">
            <template solt-scope="scope">
                <button type="danger" @click="refresh">重新获取</button>
                <button type="danger" @click="deleteHandle">删除</button>
            </template>
        </el-table-column>
    </el-table>
    <el-dialog title="新增" :visible.sync="dialogFormVisible" width="700px" :close-on-click-modal="false">
        <el-form :model="form">
            <el-form-item label="输入模式" label-width="80px">
                <el-radio-group v-model="form.mode">
                    <el-radio :label="1">输入AK</el-radio>
                    <el-radio :label="2">用户名登录(手机号码)</el-radio>
                    <el-radio :label="3">验证码登录</el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="所属环境" label-width="80px">
                <el-select v-model="form.env">
                    <el-option v-for="item in envList" :key="item.value" :value="item.value" :label="item.label"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item v-if="form.mode===1" label="AK值" label-width="80px">
                <el-input v-model="form.ak" autocomplete="off"></el-input>
            </el-form-item>
            <template v-if="form.mode===2">
                <el-form-item label="用户名" label-width="80px">
                    <el-input v-model="form.loginName" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="密码" label-width="80px">
                    <el-input type="password" v-model="form.password" autocomplete="off"></el-input>
                </el-form-item>
            </template>
            <template v-if="form.mode===3">
                <el-form-item label="用户名" label-width="80px">
                    <el-input v-model="form.loginName" autocomplete="off">
                            <template slot="append">
                                <el-button>发送</el-button>
                            </template>
                    </el-input>
                </el-form-item>
                <el-form-item label="验证码" label-width="80px">
                    <el-input v-model="form.vertifyCode" autocomplete="off"></el-input>
                </el-form-item>
            </template>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="conformHandle">确 定</el-button>
            <el-button @click="cancelHandle">取 消</el-button>
        </div>
    </el-dialog>
</div>
